What did the "great powers" do to create this refugee situation? It is ISIS and other not so great powers that are responsible for it.
As for the immigration problem I think that the West should stop all legal immigration but allow desperate refugees that have risked their lives temporary asylum. There is, unfortunately, a limit as to how many millions and tens of millions of people can be absorbed by any nation.
So long as the problems in that part of the world remain the refugee crisis is going to remain. The problems those nations are undergoing have to be resolved and that will probably require some level of military intervention.
Creative ideas in solving the issue are necessary. I don't pretend to have the answers but it's worth a brainstorm. Perhaps refugee men of military age can be trained to be soldiers and sent back to their countries in order to overthrow the governments/ISIS responsible for this mess.
Another idea is to invade those nations to keep ISIS in check and then arm the Kurds (not to be confused for the regular Sunnis who are reluctantly allying themselves with ISIS in response to Shiite persecution). I believe in the three nation solution for Iraq with autonomy also for the Kurds in other nations. They will fight to the death if we assist them and I don't mean the half ass containment policy that Obama has.
Something has to be done.